<?php

namespace App\Http\Controllers\api;

use App\Http\Controllers\Controller;
use App\Service\CommonService;
use App\Service\ContentCheck;
use Illuminate\Http\Request;

class ImageController extends Controller
{

    /**
     * @param Request $request
     * @return false|mixed
     * User : 邢洋洋
     * Data : 2022/11/11
     * Time : 9:21
     * 文本审核
     */
    public function textApi(Request $request)
    {
        $text = $request->input('text');
        $data = ContentCheck::textCheck($text);
        return CommonService::success(200,'文字审核成功',$data);
    }

    /**
     * @param Request $request
     * @return mixed
     * User : 邢洋洋
     * Data : 2022/11/11
     * Time : 9:22
     * 图片审核
     */
    public function imageApi(Request $request)
    {
        $file = $request->input('image');
        $data = ContentCheck::imgCheck($file);
        return CommonService::success(200,'图片审核成功',$data);
    }
}
